﻿<ResourceDictionary
        xmlns="http://schemas.microsoft.com/client/2007" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:local="clr-namespace:DiscoveryLogic.UI.Layouts.WrappedControls;assembly=UI.Layouts"   
        xmlns:src="clr-namespace:DiscoveryLogic.UI.Layouts.Controls;assembly=UI.Layouts"
        xmlns:extended="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
		xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows"
		xmlns:primitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows"
        xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
        >


    <Style TargetType="src:GraphSlider">
        <Setter Property="Title" Value="Mortgage Timeline" />
        <Setter Property="BalanceLegend" Value="Balance" />
        <Setter Property="CompleteDescriptionFormat" Value="Complete\n{0:MMMM yyyy}" />
        <Setter Property="XAxisDateFormat" Value="{}{0:MMMM yyyy}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="src:GraphSlider">
                    <Canvas x:Name="LineGraphCanvas" >


                        <Path x:Name="Axis" Stretch="Fill" Stroke="#FF000000" StrokeEndLineCap="Round" StrokeStartLineCap="Round" 
                              Data="M330,144.873 L330,275.873 566,275.873" Width="500" Height="126" Canvas.Left="46.011"/>

                        <TextBlock Height="22" TextWrapping="Wrap" x:Name="Title" Text="Mortgage Timeline" Width="127" 
                                   Canvas.Left="46.011" Canvas.Top="155.5" FontFamily="Trebuchet MS"/>
                                        
                        <Path x:Name="StartNotch"  Stretch="Fill" Stroke="#FF146481" StrokeEndLineCap="Flat" StrokeStartLineCap="Flat" 
                              StrokeThickness="1" Width="1" Height="25.666" Data="M592.5,256.873 L592.5,241.373" Canvas.Left="391.001" Canvas.Top="100.334"/>
                        
                        <TextBlock x:Name="BalanceLegend" RenderTransformOrigin="0.5,0.5" Width="54" Height="19.608" FontSize="10" Text="Balance (^)" 
                                   TextWrapping="Wrap" Canvas.Top="29.892" FontFamily="Trebuchet MS">
                          <TextBlock.RenderTransform>
                            <TransformGroup>
                              <ScaleTransform ScaleX="1" ScaleY="1"/>
                              <SkewTransform AngleX="0" AngleY="0"/>
                              <RotateTransform Angle="-90"/>
                              <TranslateTransform X="0" Y="0"/>
                            </TransformGroup>
                          </TextBlock.RenderTransform>
                        </TextBlock>
                        
                        <Canvas x:Name="GraphLineCanvas" >

                              <Path x:Name="Payments" Opacity="0.995" Stretch="Fill"  StrokeEndLineCap="Round" StrokeStartLineCap="Round" StrokeThickness="1" Data="M0.5,0.5 L76.961913,5.8846417 142.5,27.5 142.5,100.5 0.5,100.5 z" Width="143" Height="101" Canvas.Left="46.011" Canvas.Top="25">
                                <Path.Stroke>
                                  <SolidColorBrush x:Name="DesignerPalette2" Color="#FF1d62af"/>
                                </Path.Stroke>
                                <Path.Fill>
                                  <LinearGradientBrush EndPoint="0.958,-0.134" StartPoint="-0.378,4.094">
                                    <GradientStop Color="#FF146481" Offset="0"/>
                                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                                  </LinearGradientBrush>
                                </Path.Fill>
                              </Path>
                              <Path x:Name="EstimatedTrack" StrokeDashArray="3" Opacity="0.995" Stretch="Fill" Stroke="#FF146481" StrokeEndLineCap="Round" StrokeStartLineCap="Round" StrokeThickness="1" Width="0" Data="M361,191.873 L610,263.873" Height="73" Canvas.Left="189.011" Canvas.Top="53">
                              </Path>

                        </Canvas>

                        
                       <Canvas x:Name="SliderCanvas" Width="14.336" Canvas.Top="118.664" Canvas.Left="0" RenderTransformOrigin="0.5,0.5" Height="16">
    	                    <Canvas.RenderTransform>
    		                    <TransformGroup>
    			                    <ScaleTransform ScaleX="1" ScaleY="1"/>
    			                    <SkewTransform AngleX="0" AngleY="0"/>
    			                    <RotateTransform Angle="0"/>
    			                    <TranslateTransform X="0" Y="0"/>
    		                    </TransformGroup>
    	                    </Canvas.RenderTransform>
                          <Ellipse x:Name="SliderThumb" StrokeEndLineCap="Flat" StrokeStartLineCap="Flat" StrokeThickness="1" Height="14.336" Width="14.336" Canvas.ZIndex="99" >
                            <Ellipse.Fill>
                              <RadialGradientBrush GradientOrigin="0.354,0.399">
                                <RadialGradientBrush.RelativeTransform>
                                  <TransformGroup>
                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.118" ScaleY="1.118"/>
                                    <SkewTransform AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5"/>
                                    <RotateTransform Angle="0" CenterX="0.5" CenterY="0.5"/>
                                    <TranslateTransform X="-0.016" Y="-0.029"/>
                                  </TransformGroup>
                                </RadialGradientBrush.RelativeTransform>
                                <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                <GradientStop Color="#FF146581" Offset="0.827"/>
                                <GradientStop Color="#FF8CB4C1" Offset="0.197"/>
                                <GradientStop Color="#FF6EA0B1" Offset="1"/>
                                <GradientStop Color="#FF1D6B86" Offset="0.567"/>
                              </RadialGradientBrush>
                            </Ellipse.Fill>
                          </Ellipse>
                          <Path  Stretch="Fill" Stroke="#FF146481" StrokeEndLineCap="Flat" StrokeStartLineCap="Flat" StrokeThickness="1" Width="1" Height="17.5" Data="M592.5,256.873 L592.5,241.373" Canvas.Left="7" Canvas.Top="-10" />
                          <TextBlock x:Name="Complete" Width="60.5" FontSize="8" Foreground="#FF146481" TextWrapping="Wrap" Height="23.333" FontFamily="Trebuchet MS" Canvas.Left="-12" Canvas.Top="-40">
                              <Run >Complete</Run>
                              <LineBreak/>
                              <Run x:Name="CompletedDate" >April 2019</Run>
                          </TextBlock>
                        </Canvas>
                      </Canvas>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style TargetType="src:CylinderSlider">
        <Setter Property="Title" Value="Monthly Payment" />
        <Setter Property="LowValueDescription" Value="Interest" />
        <Setter Property="CurrentValueDescription" Value="Principal" />
        <Setter Property="LowValue" Value="900" />
        <Setter Property="CurrentValue" Value="3000" />
        <Setter Property="MinPayment" Value="600" />
        <Setter Property="MaxPayment" Value="5000" />
        <Setter Property="MinPaymentFormat" Value="Min Payment {0:C}" />
        <Setter Property="LowValueFormat" Value="Interest {0:C}" />
        <Setter Property="ZeroValueFormat" Value="{}{0:C}" />
        <Setter Property="MaxValueFormat" Value="{}{0:C}" />
        <Setter Property="CurrentValueFormat" Value="{}{0:C}" />

        <Setter Property="BottomCylinderRoofBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="2.575,-3.073" StartPoint="0.138,1.404">
                    <GradientStop Color="#FFFFFFFF" Offset="0"/>
                    <GradientStop Color="#FF072F2F" Offset="0.63"/>
                    <GradientStop Color="#FF5C7676" Offset="0.053"/>
                    <GradientStop Color="#FF516D6D" Offset="1"/>
                    <GradientStop Color="#FF123838" Offset="0.88"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="BottomCylinderBodyBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                    <GradientStop Color="#FFFFFFFF" Offset="0"/>
                    <GradientStop Color="#FF072F2F" Offset="0.63"/>
                    <GradientStop Color="#FF5C7676" Offset="0.053"/>
                    <GradientStop Color="#FF516D6D" Offset="1"/>
                    <GradientStop Color="#FF123838" Offset="0.88"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        
        <Setter Property="TopCylinderRoofBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="2.606,-3.139" StartPoint="-0.075,0.967">
                    <GradientStop Color="#FFFFFFFF" Offset="0"/>
                    <GradientStop Color="#FF146581" Offset="0.827"/>
                    <GradientStop Color="#FF8CB4C1" Offset="0.091"/>
                    <GradientStop Color="#FF6EA0B1" Offset="1"/>
                    <GradientStop Color="#FF1D6B86" Offset="0.567"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="TopCylinderBodyBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                    <GradientStop Color="#FFFFFFFF" Offset="0"/>
                    <GradientStop Color="#FF146581" Offset="0.827"/>
                    <GradientStop Color="#FF8CB4C1" Offset="0.091"/>
                    <GradientStop Color="#FF6EA0B1" Offset="1"/>
                    <GradientStop Color="#FF1D6B86" Offset="0.567"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="ThumbBrush">
            <Setter.Value>
                <RadialGradientBrush GradientOrigin="0.354,0.399">
                    <RadialGradientBrush.RelativeTransform>
                        <TransformGroup>
                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.118" ScaleY="1.118"/>
                            <SkewTransform AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5"/>
                            <RotateTransform Angle="0" CenterX="0.5" CenterY="0.5"/>
                            <TranslateTransform X="-0.016" Y="-0.029"/>
                        </TransformGroup>
                    </RadialGradientBrush.RelativeTransform>
                    <GradientStop Color="#FFFFFFFF" Offset="0"/>
                    <GradientStop Color="#FF146581" Offset="0.827"/>
                    <GradientStop Color="#FF8CB4C1" Offset="0.197"/>
                    <GradientStop Color="#FF6EA0B1" Offset="1"/>
                    <GradientStop Color="#FF1D6B86" Offset="0.567"/>
                </RadialGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="src:CylinderSlider">

                    <Canvas x:Name="RootElement">
                        <Canvas.RenderTransform>
                            <TranslateTransform X="100" />
                        </Canvas.RenderTransform>

                        <Path Stretch="Fill" Stroke="#FF000000" StrokeEndLineCap="Round" StrokeStartLineCap="Round" StrokeThickness="1.5" Canvas.Left="0" Height="250"  Width="2" Data="M211,220 L211,521.23911" x:Name="SliderBar" Canvas.Top="90.373" />

                        <Path Stretch="Fill" Stroke="#FF000000" StrokeEndLineCap="Round" StrokeStartLineCap="Round" StrokeThickness="1.5" Canvas.Left="0" Canvas.Top="340.373" Width="140" Height="2" Data="M463,506 L178.22465,506" x:Name="Horizontal" />

                        <!-- Cylinders -->

                        <Canvas Canvas.Left="20" Canvas.Top="70.375" x:Name="PaymentBar">
                            <!-- Styling is done from the setters above -->
                            <Ellipse Height="40"  Width="101" Canvas.Top="250" x:Name="InterestBase" />
                            <Rectangle Canvas.Left="0" Width="101" Height="125" Canvas.Top="145" x:Name="InterestBarrel" />
                            <Ellipse Height="40" Width="101" Canvas.Top="125" x:Name="InterestTop" />

                            <Ellipse Height="40"  Width="101" Canvas.Top="125" x:Name="PrincipalBase" />
                            <Rectangle Canvas.Left="0" Canvas.Top="20" RenderTransformOrigin="0.5,0.5" Width="101" Height="125" x:Name="PrincipalBarrel" />
                            <Ellipse Height="40" Width="101" x:Name="PrincipalTop" />
                               
                            <Ellipse Height="40" Width="101" x:Name="PrincipalGlassTop">
                                <Ellipse.Stroke>
                                    <LinearGradientBrush EndPoint="-0.067,1.242" StartPoint="0.908,0.108">
                                        <GradientStop Color="#00FFFFFF" Offset="0"/>
                                        <GradientStop Color="#FFFFFFFF" Offset="1"/>
                                    </LinearGradientBrush>
                                </Ellipse.Stroke>
                                <Ellipse.Fill>
                                    <LinearGradientBrush EndPoint="1.878,-1.502" StartPoint="-0.28,1.786" SpreadMethod="Repeat">
                                        <GradientStop Color="#78FFFFFF" Offset="0.581"/>
                                        <GradientStop Color="#00FFFFFF" Offset="0.622"/>
                                        <GradientStop Color="#00FFFFFF" Offset="0.4"/>
                                        <GradientStop Color="#3EFFFFFF" Offset="0.444"/>
                                        <GradientStop Color="#00FFFFFF" Offset="0.736"/>
                                        <GradientStop Color="#61FFFFFF" Offset="0.708"/>
                                        <GradientStop Color="#00FFFFFF" Offset="0.935"/>
                                        <GradientStop Color="#00FFFFFF" Offset="0.935"/>
                                        <GradientStop Color="#00FFFFFF" Offset="0.881"/>
                                        <GradientStop Color="#00FFFFFF" Offset="0.293"/>
                                        <GradientStop Color="#32FFFFFF" Offset="0.315"/>
                                        <GradientStop Color="#00FFFFFF" Offset="0.369"/>
                                        <GradientStop Color="#58FEFEFE" Offset="0.012"/>
                                        <GradientStop Color="#59FEFEFE" Offset="0.979"/>
                                        <GradientStop Color="#18FFFFFF" Offset="0.057"/>
                                        <GradientStop Color="#00FFFFFF" Offset="0.688"/>
                                        <GradientStop Color="#18FFFFFF" Offset="0.475"/>
                                    </LinearGradientBrush>
                                </Ellipse.Fill>
                            </Ellipse>



                        </Canvas>

                        <TextBlock Height="11.296" FontSize="10" FontWeight="Bold" Foreground="#FF1D62AF"  TextWrapping="Wrap"  Canvas.Left="130" Canvas.Top="212.704"  Text="Interest" x:Name="LowValueDescriptionLabel"/>

                        <!-- Text ovr top-->

                        <TextBlock x:Name="LowValueLabel" Height="11" FontSize="9" Text="0" TextAlignment="Right" TextWrapping="Wrap" Width="60" Canvas.Left="-64" Canvas.Top="240" FontFamily="Trebuchet MS"/>
                          <Path x:Name="LowValueLine" Stretch="Fill" Stroke="#FF000000" StrokeEndLineCap="Round" StrokeStartLineCap="Round" StrokeThickness="1.5" Canvas.Left="0" Canvas.Top="265" Width="8.008" Height="1" Data="M49,331.873 L58.333333,331.873"/>
                          
                          <TextBlock x:Name="SliderMinLabel" Height="11" FontSize="9" Text="0" TextAlignment="Right" TextWrapping="Wrap" Width="60" Canvas.Left="-64" Canvas.Top="200" FontFamily="Trebuchet MS"/>
                          <Path x:Name="SliderMinLine" Stretch="Fill" Stroke="#FF000000" StrokeEndLineCap="Round" StrokeStartLineCap="Round" StrokeThickness="1.5" Canvas.Left="0" Canvas.Top="265" Width="8.008" Height="1" Data="M49,331.873 L58.333333,331.873"/>

                          <TextBlock x:Name="ZeroLabel" Height="11" FontSize="9" Text="0" TextAlignment="Right" TextWrapping="Wrap" Width="60" Canvas.Left="-64" Canvas.Top="360" FontFamily="Trebuchet MS"/>  

                          <TextBlock x:Name="SliderMaxLabel" Height="11" FontSize="9" Text="0" TextAlignment="Right" TextWrapping="Wrap" Width="60" Canvas.Left="-64" Canvas.Top="220" FontFamily="Trebuchet MS"/>
                          <Path x:Name="SliderMaxLine" Stretch="Fill" Stroke="#FF000000" StrokeEndLineCap="Round" StrokeStartLineCap="Round" StrokeThickness="1.5" Canvas.Left="0" Canvas.Top="90.373" Width="8.008" Height="1" Data="M49,331.873 L58.333333,331.873"/>

                          <TextBlock TextAlignment="Center" FontSize="14"  Canvas.Top="360" x:Name="TitleLabel" Width="140" Height="28" TextWrapping="Wrap" FontFamily="Trebuchet MS">
                             <Run Text="Monthly Payment ($)"></Run>
                           </TextBlock>

                          <Canvas x:Name="VerticalSlider" Canvas.Left="-7" Canvas.Top="120" Width="130" Height="17.336" Cursor="Hand">

                            <Path StrokeDashArray="5" Width="130" Stretch="Fill" Stroke="#FF1d62af" StrokeEndLineCap="Round" StrokeStartLineCap="Round" Data="M463,506 L178.22465,506" StrokeDashCap="Round" StrokeDashOffset="3" StrokeThickness="1.5" Height="2" Canvas.Left="0" Canvas.Top="9" />

                            <TextBlock x:Name="CurrentValueLabel" Height="23.873" FontSize="9" FontWeight="Bold" TextAlignment="Right" Foreground="#FF1D62AF" Text="$5" TextWrapping="Wrap" Width="60" Canvas.Left="-65" Canvas.Top="3" FontFamily="Trebuchet MS"/>
                            <TextBlock  Canvas.Left="137" FontSize="10" Canvas.Top="6"  Height="12"  FontWeight="Bold" Foreground="#FF1D62AF"  TextWrapping="Wrap" x:Name="CurrentValueDescriptionLabel" Text="Principal" />

                            <Ellipse x:Name="SliderThumb" StrokeEndLineCap="Flat" StrokeStartLineCap="Flat" StrokeThickness="1" Width="17.336" Height="17.336" Canvas.Left="0" Canvas.Top="0">
                            </Ellipse>

                          </Canvas>

                    </Canvas>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>



    <Style TargetType="local:Button">
        
        
        <!-- Cannot currently parse FontFamily type in XAML so it's being set in code -->
        <!-- <Setter Property="FontFamily" Value="Trebuchet MS" /> -->
        <Setter Property="FontSize" Value="18" />
        <Setter Property="ReflectionVisibility" Value="Visible" />
        <Setter Property="IsEnabled" Value="true" />
        <Setter Property="IsTabStop" Value="true" />        
        <Setter Property="Foreground" Value="#FFFFFFFF" />
        <Setter Property="MinWidth" Value="5" />
        <Setter Property="MinHeight" Value="5" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="Cursor" Value="Hand" />
        <!-- Cannot currently parse FontFamily type in XAML so it's being set in code -->
        <!-- <Setter Property="FontFamily" Value="Trebuchet MS" /> -->
        <Setter Property="FontSize" Value="18" />
        <!-- Cannot currently parse FontWeight type in XAML so it's being set in code -->
        <!-- <Setter Property="FontWeight" Value="Bold" /> -->

       
    
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:Button">
                    <Grid>
                        <Grid.Resources>
                            <!-- Visual constants used by the template -->
                            <Color x:Key="LinearBevelLightStartColor">#FCFFFFFF</Color>
                            <Color x:Key="LinearBevelLightEndColor">#F4FFFFFF</Color>
                            <Color x:Key="LinearBevelDarkStartColor">#E0FFFFFF</Color>
                            <Color x:Key="LinearBevelDarkEndColor">#B2FFFFFF</Color>
                            <Color x:Key="MouseOverLinearBevelDarkEndColor">#7FFFFFFF</Color>
                            <Color x:Key="HoverLinearBevelLightStartColor">#FCFFFFFF</Color>
                            <Color x:Key="HoverLinearBevelLightEndColor">#EAFFFFFF</Color>
                            <Color x:Key="HoverLinearBevelDarkStartColor">#D8FFFFFF</Color>
                            <Color x:Key="HoverLinearBevelDarkEndColor">#4CFFFFFF</Color>
                            <Color x:Key="CurvedBevelFillStartColor">#B3FFFFFF</Color>
                            <Color x:Key="CurvedBevelFillEndColor">#3CFFFFFF</Color>
                            <SolidColorBrush x:Key="BorderBrush" Color="#FF000000" />
                            <SolidColorBrush x:Key="AccentBrush" Color="#FFFFFFFF" />
                            <SolidColorBrush x:Key="DisabledBrush" Color="#A5FFFFFF" />
                            <LinearGradientBrush x:Key="FocusedStrokeBrush" StartPoint="0.5,0" EndPoint="0.5,1">
                                <GradientStop Color="#B2FFFFFF" Offset="0" />
                                <GradientStop Color="#51FFFFFF" Offset="1" />
                                <GradientStop Color="#66FFFFFF" Offset="0.325" />
                                <GradientStop Color="#1EFFFFFF" Offset="0.325" />
                            </LinearGradientBrush>
                        </Grid.Resources>
                        

                        <Grid.RowDefinitions>
                            <RowDefinition Height="0.35*" />
                            <RowDefinition Height="0.15*" />
                            <RowDefinition Height="0.05*" />
                            <RowDefinition Height="0.15*" />
                            <RowDefinition Height="0.3*" />

                        </Grid.RowDefinitions>

                        <Rectangle Grid.Row="1" Grid.RowSpan="2" StrokeEndLineCap="Flat" StrokeStartLineCap="Flat" StrokeThickness="1" RadiusX="11" RadiusY="15" RenderTransformOrigin="0.5,0.5" Margin="5,4,5,-4" x:Name="BottomGlowRect" Visibility="{TemplateBinding ReflectionVisibility}">
                            <Rectangle.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="1" ScaleY="1"/>
                                    <SkewTransform AngleX="0" AngleY="0"/>
                                    <RotateTransform Angle="180"/>
                                    <TranslateTransform X="0" Y="0"/>
                                </TransformGroup>
                            </Rectangle.RenderTransform>
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.756,0" StartPoint="0.756,1" MappingMode="RelativeToBoundingBox">

                                    <GradientStop Color="#FFFFFFFF" Offset="0.01"/>
                                    <GradientStop Color="#00FFFFFF" Offset="1"/>
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>

                        <Rectangle  StrokeEndLineCap="Flat" StrokeStartLineCap="Flat" StrokeThickness="1.5" RadiusX="11" RadiusY="15" Opacity="1" Grid.RowSpan="2" Stroke="#FF337979" x:Name="BackgroundRect" >
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.796,1.789" StartPoint="0.799,3.169" >
                                    <LinearGradientBrush.Transform>
                                        <MatrixTransform Matrix="1,0,0,-1,-27.270996,84.062012"/>
                                    </LinearGradientBrush.Transform>
                                    <GradientStop Color="#FFFFFFFF" Offset="0.183"/>
                                    <GradientStop Color="#FFA0CAEB" Offset="0.351"/>
                                    <GradientStop Color="#FF1671BF" Offset="0.75"/>
                                    <GradientStop Color="#FFC0DEF4" Offset="0.927007"/>
                                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle StrokeEndLineCap="Flat" Margin="5,0.5,5,-0.5" StrokeStartLineCap="Flat" StrokeThickness="1" RadiusX="11" RadiusY="15" Opacity="0.47" Canvas.Left="1.5" Canvas.Top="0.334" x:Name="TopGlowRect">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.961,5.083" StartPoint="0.961,4.446" MappingMode="RelativeToBoundingBox">
                                    <LinearGradientBrush.Transform>
                                        <MatrixTransform Matrix="1,0,0,-1,-27.270996,84.062012"/>
                                    </LinearGradientBrush.Transform>
                                    <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                    <GradientStop Color="#00FFFFFF" Offset="1"/>
                                    <GradientStop Color="#8BFFFFFF" Offset="0.688"/>
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle Grid.Row="3" StrokeEndLineCap="Flat" StrokeStartLineCap="Flat" StrokeThickness="1" RadiusX="11" RadiusY="15" Opacity="0.4" Grid.RowSpan="2" x:Name="ReflectionRect" Visibility="{TemplateBinding ReflectionVisibility}" >
                            <Rectangle.Fill>
                                <LinearGradientBrush StartPoint="0.732,0" EndPoint="0.732,1"   >
                                    <GradientStop Color="#FFC0DEF4" Offset="0.05"/>
                                    <GradientStop Color="#C91671BF" Offset="0.161"/>
                                    <GradientStop Color="#00FFFFFF" Offset="0.552"/>


                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        
                        <ContentPresenter Grid.RowSpan="3"  
						      x:Name="CP"
							  Content="{TemplateBinding Content}"
							  Margin="0,0,0,1.5" 
							  RenderTransformOrigin="0.5,0.5" >

                            <ContentPresenter.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="1.0" ScaleY="1.0" />
                                </TransformGroup>
                            </ContentPresenter.RenderTransform>
                        </ContentPresenter>
                        
                        <Rectangle x:Name="Disabled" RadiusX="4" RadiusY="4" Fill="{StaticResource DisabledBrush}" Opacity="0" IsHitTestVisible="false" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
	


	


   <Style TargetType="local:Slider">
        <!-- Any other properties you want to set -->
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:Slider">
                    <Grid x:Name="Root">
                        <!-- States -->
                        <Grid.Resources>
                            
                            <!-- RepeatButton Templates -->
                            <ControlTemplate x:Key="RepeatButtonTemplate">
                                <Grid x:Name="Root" Background="Transparent" Opacity="0" />
                            </ControlTemplate>

                            <ControlTemplate x:Key="RoundThumb" >
                                <Grid x:Name="RootElement">
                                    <Ellipse HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Fill="#FFFFFFFF" Stroke="#CD1D62AF" StrokeEndLineCap="Round" StrokeStartLineCap="Round" StrokeThickness="1">
                                    </Ellipse>
                                </Grid>
                            </ControlTemplate>
                        </Grid.Resources>
                        <vsm:VisualStateManager.VisualStateGroups>
                            <vsm:VisualStateGroup x:Name="CommonStates">
                                <vsm:VisualStateGroup.Transitions>
                                    <vsm:VisualTransition GeneratedDuration="0" />
                                </vsm:VisualStateGroup.Transitions>
                                <vsm:VisualState x:Name="Normal" />
                                <vsm:VisualState x:Name="MouseOver" />
                                <vsm:VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0" />
                                    </Storyboard>
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>
                            <vsm:VisualStateGroup x:Name="FocusStates">
                                <vsm:VisualStateGroup.Transitions>
                                    <vsm:VisualTransition GeneratedDuration="0" />
                                </vsm:VisualStateGroup.Transitions>
                                <vsm:VisualState x:Name="Unfocused" />
                                <vsm:VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                                    </Storyboard>
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>
                        </vsm:VisualStateManager.VisualStateGroups>

                        <!-- Horizontal Template -->
                        <Grid x:Name="HorizontalTemplate">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>

                            <!-- Track Layer -->
                            <Rectangle Stroke="#CD1D62AF"  StrokeThickness="0.5" Fill="#FFE6EFF7" Grid.Column="0" Grid.ColumnSpan="3" Height="3" Margin="5,0,5,0" />

                            <!-- Repeat Buttons + Thumb -->
                            <RepeatButton x:Name="HorizontalTrackLargeChangeDecreaseRepeatButton" Grid.Column="0" Template="{StaticResource RepeatButtonTemplate}" IsTabStop="False" />
                            <Thumb x:Name="HorizontalThumb" Height="13" Width="13" Grid.Column="1" Template="{StaticResource RoundThumb}"/>
                            <RepeatButton x:Name="HorizontalTrackLargeChangeIncreaseRepeatButton" Grid.Column="2" Template="{StaticResource RepeatButtonTemplate}" IsTabStop="False" />
                        </Grid>

                        <!-- Vertical Template -->
                        <Grid x:Name="VerticalTemplate" Visibility="Collapsed">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>

                            <!-- Track Layer -->
                            <Rectangle Stroke="#CD1D62AF" StrokeThickness="0.5" Fill="#FFE6EFF7" Grid.Row="0" Grid.RowSpan="3" Width="3" Margin="0,5,0,5" />

                            <!-- Repeat Buttons + Thumb -->
                            <RepeatButton x:Name="VerticalTrackLargeChangeDecreaseRepeatButton" Grid.Row="2" Template="{StaticResource RepeatButtonTemplate}" IsTabStop="False" />
                            <Thumb x:Name="VerticalThumb" Height="13" Width="13" Grid.Row="1" Template="{StaticResource RoundThumb}" />
                            <RepeatButton x:Name="VerticalTrackLargeChangeIncreaseRepeatButton" Grid.Row="0" Template="{StaticResource RepeatButtonTemplate}" IsTabStop="False" />
                        </Grid>

                        <!-- Focus indicator -->
                        <Rectangle x:Name="FocusVisual" Stroke="#666666" StrokeDashArray=".2 5" StrokeDashCap="Round" IsHitTestVisible="false" Opacity="0" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style TargetType="local:VideoToggleButton">
        <!-- Cannot currently parse bool? type in XAML so it's being set in code -->
        <!-- <Setter Property="IsChecked" Value="false" /> -->
        <Setter Property="IsEnabled" Value="true" />
        <Setter Property="IsTabStop" Value="true" />
       
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:VideoToggleButton">
                    <Grid>
                        <Grid.Resources>
                            <!-- Visual constants used by the template -->
                            <Color x:Key="BaseColor">#FF003255</Color>
                            <Color x:Key="LinearBevelLightStartColor">#FCFFFFFF</Color>
                            <Color x:Key="LinearBevelLightEndColor">#F4FFFFFF</Color>
                            <Color x:Key="LinearBevelDarkStartColor">#E0FFFFFF</Color>
                            <Color x:Key="LinearBevelDarkEndColor">#B2FFFFFF</Color>
                            <Color x:Key="MouseOverLinearBevelDarkEndColor">#7FFFFFFF</Color>
                            <Color x:Key="HoverLinearBevelLightStartColor">#ECFFFFFF</Color>
                            <Color x:Key="HoverLinearBevelLightEndColor">#DAFFFFFF</Color>
                            <Color x:Key="HoverLinearBevelDarkStartColor">#C4FFFFFF</Color>
                            <Color x:Key="HoverLinearBevelDarkEndColor">#44FFFFFF</Color>
                            <Color x:Key="CheckedLinearBevelLightStartColor">#FCFFFFFF</Color>
                            <Color x:Key="CheckedLinearBevelLightEndColor">#EAFFFFFF</Color>
                            <Color x:Key="CheckedLinearBevelDarkStartColor">#D8FFFFFF</Color>
                            <Color x:Key="CheckedLinearBevelDarkEndColor">#4CFFFFFF</Color>
                            <Color x:Key="CurvedBevelFillStartColor">#B3FFFFFF</Color>
                            <Color x:Key="CurvedBevelFillEndColor">#3CFFFFFF</Color>
                            <Color x:Key="HoverPressedCurvedBevelFillStartColor">#6FFFFFFF</Color>
                            <Color x:Key="HoverPressedCurvedBevelFillEndColor">#39FFFFFF</Color>
                            <SolidColorBrush x:Key="BorderBrush" Color="#FF000000" />
                            <SolidColorBrush x:Key="AccentBrush" Color="#FFFFFFFF" />
                            <SolidColorBrush x:Key="DisabledBrush" Color="#A5FFFFFF" />
                            <LinearGradientBrush x:Key="FocusedStrokeBrush" StartPoint="0.5,0" EndPoint="0.5,1">
                                <GradientStop Color="#B2FFFFFF" Offset="0" />
                                <GradientStop Color="#51FFFFFF" Offset="1" />
                                <GradientStop Color="#66FFFFFF" Offset="0.325" />
                                <GradientStop Color="#1EFFFFFF" Offset="0.325" />
                            </LinearGradientBrush>
                        </Grid.Resources>
                        <vsm:VisualStateManager.VisualStateGroups>
                            
                            <vsm:VisualStateGroup x:Name="CheckStates">
                                <vsm:VisualStateGroup.Transitions>
                                    <vsm:VisualTransition GeneratedDuration="0:0:0.1" />
                                </vsm:VisualStateGroup.Transitions>
                                <vsm:VisualState x:Name="Checked">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PauseIcon" Storyboard.TargetProperty="(UIElement.Opacity)" BeginTime="00:00:00">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PlayIcon" Storyboard.TargetProperty="(UIElement.Opacity)" BeginTime="00:00:00">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="Unchecked">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PauseIcon" Storyboard.TargetProperty="(UIElement.Opacity)" BeginTime="00:00:00">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PlayIcon" Storyboard.TargetProperty="(UIElement.Opacity)" BeginTime="00:00:00">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="Indeterminate">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="LinearBevelLightEnd" Storyboard.TargetProperty="Offset" To="0.2" Duration="0" />
                                        <DoubleAnimation Storyboard.TargetName="Indeterminate" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                                    </Storyboard>
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>
                            
                        </vsm:VisualStateManager.VisualStateGroups>

                        
                        
                        
                        <Canvas x:Name="Video1PlayBut" Width="23" Height="23" RenderTransformOrigin="0,0" VerticalAlignment="Top" HorizontalAlignment="Left" >
                            <Canvas.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="1.5" ScaleY="1.5"/>
                                    <SkewTransform AngleX="0" AngleY="0"/>
                                    <RotateTransform Angle="0"/>
                                    <TranslateTransform X="0" Y="0"/>
                                </TransformGroup>
                            </Canvas.RenderTransform>
                            <Ellipse Width="23" Height="23" StrokeThickness="1">
                                <Ellipse.Fill>
                                    <RadialGradientBrush GradientOrigin="0.5,0.717">
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="2.541" ScaleY="1.227"/>
                                                <SkewTransform AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5"/>
                                                <RotateTransform Angle="0" CenterX="0.5" CenterY="0.5"/>
                                                <TranslateTransform X="0.001" Y="0.11"/>
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#FF1D62AF" Offset="0.356"/>
                                        <GradientStop Color="#FF072F2F" Offset="1"/>
                                        <GradientStop Color="#FF74B6FF" Offset="0"/>
                                    </RadialGradientBrush>
                                </Ellipse.Fill>
                                <Ellipse.Stroke>
                                    <LinearGradientBrush EndPoint="0.505,1.012" StartPoint="0.522,0.239">
                                        <GradientStop Color="#FF072F2F" Offset="0"/>
                                        <GradientStop Color="#FF1D62AF" Offset="0.591"/>
                                        <GradientStop Color="#FF74B6FF" Offset="1"/>
                                    </LinearGradientBrush>
                                </Ellipse.Stroke>
                            </Ellipse>
                            <Ellipse Width="23" Height="23" StrokeThickness="1">
                                <Ellipse.Fill>
                                    <RadialGradientBrush GradientOrigin="0.503,0.59">
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.006" ScaleY="0.709"/>
                                                <SkewTransform AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5"/>
                                                <RotateTransform Angle="180" CenterX="0.5" CenterY="0.5"/>
                                                <TranslateTransform X="-0.002" Y="-0.12"/>
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#0074B6FF" Offset="0.606"/>
                                        <GradientStop Color="#AF74B6FF" Offset="0.019"/>
                                    </RadialGradientBrush>
                                </Ellipse.Fill>
                            </Ellipse>
                            <Path Width="20" Height="12.417" Stretch="Fill" StrokeThickness="1" Canvas.Left="1.5" Canvas.Top="0.931" Data="M23,11.5 C23,17.851275 20.5,11.332844 11.5,11.332844 2.5,11.332844 0,17.851275 0,11.5 0,5.1487254 5.1487254,0 11.5,0 17.851275,0 23,5.1487254 23,11.5 z">
                                <Path.Fill>
                                    <RadialGradientBrush GradientOrigin="0.5,0.717">
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.412" ScaleY="1.473"/>
                                                <SkewTransform AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5"/>
                                                <RotateTransform Angle="0" CenterX="0.5" CenterY="0.5"/>
                                                <TranslateTransform X="0.001" Y="0.228"/>
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#E9FFFFFF" Offset="1"/>
                                        <GradientStop Color="#00FFFFFF" Offset="0.337"/>
                                    </RadialGradientBrush>
                                </Path.Fill>
                            </Path>
                            <Path Width="11.875" Height="10.333" Fill="#FFFFFFFF" Stretch="Fill" Stroke="#FFFFFFFF" StrokeLineJoin="Round" StrokeThickness="1" Canvas.Left="6.75" Canvas.Top="6.647" Data="M331.875,279.624 L331.875,286.99899 340.5,282.99899 z" x:Name="PlayIcon"/>
                            <Canvas Height="10.98" x:Name="PauseIcon" Width="12.625" Canvas.Left="6" Canvas.Top="6" Opacity="0">
                                <Rectangle Height="9.3" Width="4.083" Fill="#FFFFFFFF" StrokeThickness="1"/>
                                <Rectangle Height="9.3" Width="4.083" Canvas.Left="7.083" Fill="#FFFFFFFF" StrokeThickness="1"/>
                            </Canvas>
                        </Canvas>

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


</ResourceDictionary>

